'''
Created on 02.12.2013

@author: Aleks
'''

import trunk.src
import trunk.data
import trunk.src.Corpus_Reader
from trunk.src.Corpus_Reader import Corpus_Reader
import os
from io import open

mypath = trunk.data.__path__[0]
l = Corpus_Reader()
l.read_in()

counter1 = 0
with open(os.path.join(mypath,'stemstrans.txt'), 'w', encoding="utf8") as f:
    for x in l.stemstrans.items():
        if len(x[1]) > 1:
            counter1 += 1
            f.write(str(x) + u'\n')
    
counter2 = 0
with open(os.path.join(mypath,'transstems.txt'), 'w', encoding="utf8") as f:
    for x in l.transstems.items():
        if len(x[1]) > 1:
            counter2 += 1
            f.write(str(x) + u'\n')

